<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


<!-- remove old header -->


<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>cogen API Reference Documentation
        - Class: Operation</title><meta name="MSSmartTagsPreventParsing" content="true" /><meta http-equiv="imagetoolbar" content="no" /><link href="css/default.css" rel="stylesheet" type="text/css" /><link href="css/pygments.css" rel="stylesheet" type="text/css" />
    <!-- <link rel="shortcut icon" href="/images/favicon.ico" type="image/vnd.microsoft.icon"/> -->
    <link rel="stylesheet" href="css/apydia.css" type="text/css" />
    <script src="js/jquery-1.2.1.pack.js" type="text/javascript"></script>
    <script src="js/apydia.js" type="text/javascript"></script>
	<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
</head>
<body>
    <div id="page">
        <div id="browser">
            <div class="browser-section">
                <h2>Module Index</h2>
                <ul>
                    <li>
                        <a href="cogen.html">cogen</a>
                    </li><li>
                        <a href="cogen.common.html">cogen.common</a>
                    </li><li>
                        <a href="cogen.core.html">cogen.core</a>
                    </li><li>
                        <a href="cogen.web.html">cogen.web</a>
                    </li>
                </ul>
            </div>
            <div class="browser-section">
                <h2>Methods</h2>
                <ul>
                    <li>
                        <a href="cogen.core.sockets.Operation.html#method-__init__">__init__</a>
                    </li><li>
                        <a href="cogen.core.sockets.Operation.html#method-try_run">try_run</a>
                    </li>
                </ul>
            </div>
        </div>
        <div id="content">
    <h1>Class: Operation</h1>
    <div class="docstring rst"></div>
    <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen/core/sockets.py#L47">View source</a>
    </li>
</ul>
    <div>
        <h2>Methods</h2>
            <h3 id="method-__init__">
                __init__
                <span class="args">(t, sock, timeout=None, weak_timeout=True, prio=-1)</span>
            </h3>
            <div class="docstring rst"><p>All the socket operations have these generic properties that the
poller and scheduler interprets:</p>
<ul class="simple">
<li>timeout - the ammout of time in seconds or timedelta, or the datetime value till
the poller should wait for this operation.</li>
<li>weak_timeout - if this is True the timeout handling code will take into account
the time of last activity (that would be the time of last <cite>try_run</cite> call)</li>
<li>prio - a flag for the scheduler</li>
</ul>
</div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen/core/sockets.py#L57">View source</a>
    </li>
</ul>
            <h3 id="method-try_run">
                try_run
                <span class="args">(t)</span>
            </h3>
            <div class="docstring rst"><p>This method will return a None value or raise a exception if the operation can't complete at this time.</p>
<p>The socket poller will run this method if the socket is readable/writeable.</p>
<p>If this returns a value that evaluates to False, the poller will try to run this
at a later time (when the socket is readable/writeable again).</p>
</div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen/core/sockets.py#L75">View source</a>
    </li>
</ul>
    </div>
        </div>
        <div id="footer">
            Generated with <a href="http://apydia.ematia.de/" class="extern">
            Apydia 0.0.1</a> on 2007-12-25 18:33
        </div>
    </div>
</body>
</html>